﻿namespace GoodAdmin.System;

/// <summary>
/// 菜单服务
/// </summary>
public interface IMenuService
{
    /// <summary>
    /// 添加菜单
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task AddMenu(MenuAddInput input);
    /// <summary>
    /// 修改
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task UpdateMenu(MenuUpdateInput input);
    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task DeleteMenu(MenuDeleteInput input);
    /// <summary>
    /// 获取菜单详情
    /// </summary>
    /// <param name="menuId"></param>
    /// <returns></returns>
    Task<MenuSimpleInfo> GetMenuDetail(long menuId);
    
    /// <summary>
    /// 获取菜单列表
    /// </summary>
    /// <returns></returns>
    Task<List<MenuSimpleInfo>> GetMenuList();

    /// <summary>
    /// 获取菜单树
    /// </summary>
    /// <returns></returns>
    Task<List<MenuSimpleInfo>> GetMenuTree();
    /// <summary>
    /// 根据菜单Id列表获取菜单信息
    /// </summary>
    /// <param name="IdList"></param>
    /// <returns></returns>
    Task<List<MenuSimpleInfo>> GetMenuListByMenuId(List<long> IdList);

    /// <summary>
    /// 根据角色id查询对应菜单列表
    /// </summary>
    /// <param name="roleId"></param>
    /// <returns></returns>
    Task<List<MenuSimpleInfo>> GetMenuListByRoleId(long roleId);

    /// <summary>
    /// 获取所有资源列表
    /// </summary>
    /// <returns></returns>
    List<ApiResource> GetResource();
}